package cmpe451.group7.ourcity.dao;

import java.util.Date;
import java.util.List;

import cmpe451.group7.ourcity.entity.Comment;
import cmpe451.group7.ourcity.entity.Place;
import cmpe451.group7.ourcity.entity.Tag;
import cmpe451.group7.ourcity.entity.User;

public interface CommentDAO extends GenericDAO<Comment> {

	/**
	 * Creates a comment with the given parameters
	 * 
	 * @param place
	 * @param user
	 * @param commentText
	 * @param tags
	 * @param date
	 * @return
	 */
	Comment createComment(Place place, User user, String commentText,
			List<Tag> tags, Date date);

	/**
	 * Searches the comments with the given parameters
	 * 
	 * @param placeID
	 * @param Comment
	 * @param fromDate
	 * @param toDate
	 * @param tags
	 * @return
	 */
	List<Comment> findByRestrictions(Long placeID, String Comment,
			Date fromDate, Date toDate, List<Tag> tags);

	/**
	 * Find the comments of the given place
	 * 
	 * @param place
	 * @return
	 */
	List<Comment> findPlaceComments(Place place);

	/**
	 * Finds the comments of the given place
	 * 
	 * @param placeID
	 * @return
	 */
	List<Comment> findPlaceComments(Long placeID);

	/**
	 * Finds the comments of the given user
	 * 
	 * @param userID
	 * @return
	 */
	List<Comment> findUserComments(Long userID);
}
